<html>
 <head>
	<title>[var.TITLE]</title>
	<link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
	<link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">	
 </head>
 <body bgcolor="FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
	<table border="0" cellspacing="0" cellpadding="0" width="100%" align="[var.POSITION]">
		<tr height="100%">
			<td>
			<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
				<tr valign="top">
					<td width="100%">
						<table border="0" cellspacing="0" cellpadding="5" width="100%">
							<tr>
								<td class="content2">
									<table border="0" cellspacing="0" cellpadding="0">
									<form method="post" name="page2" action="[var.FileName]?FormName=[var.FormName]" onsubmit="WriteData([var.Number]);self.close()">
										<tr>
											<td class="fieldCaption">Principal</td>
											<td class="fieldCaption">:</td>
											<td>
												<select name="principal" class="input">
												<option value="">Select Value</option>
												<option value="[princblk.kodeprincipal]">[princblk.kodeprincipal]-[princblk.nama;block=option]</option>
												</select>											
											</td>
										</tr>									
										<tr>
											<td class="fieldCaption">Vessel</td>
											<td class="fieldCaption">:</td>
											<td>
												<select name="vessel" class="input">
												<option value="">Select Value</option>
												<option value="[vesselblk.kodevessel]">[vesselblk.kodevessel]-[vesselblk.nama;block=option]</option>
												</select>											
											</td>
										</tr>
										<tr>
											<td class="fieldCaption">Voyage</td>
											<td class="fieldCaption">:</td>
											<td>
												<select name="voyage" class="input">
												<option value="">Select Value</option>
												<option value="[voyblk.NOVOYAGE]">[voyblk.NOVOYAGE;block=option]</option>
												</select>											
											</td>
										</tr>
										<tr>
											<td class="fieldCaption">Port</td>
											<td class="fieldCaption">:</td>
											<td>
											<select name="port" class="input">
											<option value="">Select Value</option>
											<option value="[portblk.kodeport]">[portblk.kodeport]-[portblk.nama;block=option]</option>
											</select>                                                                                                              
                                                                                                              </td>
										</tr>
										<tr>
											<td class="menuHeader"></td>
											<td class="menuHeader"></td>
											<td align="right">
											<input type="button" name="Action" value="Ok" class="button" onclick="WriteData([var.Number]);self.close()">
											<input type="button" name="Action" value="Cancel" class="button" onclick="self.close()">
											</td>
										</tr>
									</form>
									</table>								
								</td>
							</tr>
						</table>					
					</td>
				</tr>
			</table>
			</td>
		</tr>
 	</table>
 </body>
<script>
	ReadData([var.Number]);
	function ReadData(number) {
		var js_str;
		js_str  = "";
		js_str += "var vprincipal = window.opener.document.[var.FormName].princ"+number+".value;\n";
		js_str += "if (vprincipal.length) document.page2.principal.value = vprincipal;\n";
		js_str += "var vvessel = window.opener.document.[var.FormName].vessel"+number+".value;\n";
		js_str += "if (vvessel.length) document.page2.vessel.value = vvessel;\n";
		js_str += "var vvoyage = window.opener.document.[var.FormName].voyage"+number+".value;\n";		
		js_str += "if (vvoyage.length) document.page2.voyage.value = vvoyage; \n";
		js_str += "var vport = window.opener.document.[var.FormName].port"+number+".value;\n";		
		js_str += "if (vport.length) document.page2.port.value = vport;\n";
		eval (js_str);
	}

	function WriteData(number) {
		var js_str;
		js_str  = "";
		js_str += "window.opener.document.[var.FormName].princ"+number+".value = document.page2.principal.value;\n";
		js_str += "window.opener.document.[var.FormName].vessel"+number+".value = document.page2.vessel.value;\n";
		js_str += "window.opener.document.[var.FormName].voyage"+number+".value = document.page2.voyage.value;\n";
		js_str += "window.opener.document.[var.FormName].port"+number+".value = document.page2.port.value;\n";
		eval (js_str);		
	}
</script>
</html>
